开发者问题收集

错误:找不到模块“C:\Users\senyo\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js”

2019-11-20
12986
Error: Cannot find module 'C:\Users\senyo\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js'

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
    at executeUserCode (internal/bootstrap/node.js:499:15)
    at startMainThreadExecution (internal/bootstrap/node.js:436:3)

npm ERR! code ELIFECYCLE

npm ERR! errno 1
npm ERR! [email protected] start: `expo start`
npm ERR! Exit status 1
npm ERR!

npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\senyo\AppData\Roaming\npm-cache\_logs\2019-11-20T07_36_37_359Z-debug.log
2个回答

尝试

npm install -g expo-cli --force

这对我有用

Kushagra Kumar
2020-07-26

对我来说,node_modules 文件丢失了。检查它是否存在。为了解决这个问题,我只需转到控制面板->卸载应用程序->nodejs(右键单击 nodejs)->选择修复。我的 node_modules 文件又回来了。

Yus
2021-06-15