Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead

前端 未结 2 1151
野趣味
野趣味 2021-01-12 10:33

I just freshly installed Node.js and now I\'m trying to run a simple script, but I get the following error message:

Error: require.paths is removed. Use node         


        
2条回答
  •  爱一瞬间的悲伤
    2021-01-12 10:48

    In my case, I have an old local (user-specific) installation of coffee-script.

    Here's what I did :

    1. deleted my ~/.node_modules folder
    2. deleted relevant binaries in ~/bin folder
    3. reinstall coffee-script : sudo npm install --global coffee-script

    Now it works :)

提交回复
热议问题