我正在参加nodeschool.io研讨会,promise-it-wont-hurt 的第二个练习是指导我安装 es6-promise。
使用我的 Windows 7 命令提示符,我正在输入npm install es6-promise(和一些其他变体)并收到消息。
npm ERR! code E404
npm ERR! 404 Not Found: es6-promise@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\...\_logs\2018-12-21T03_29_29_521Z-debug.log
Run Code Online (Sandbox Code Playgroud)
我刚刚从过去的项目中清除了我的依赖项和我的其他 node_modules,所以也许我需要安装一些其他打包来获得这个。
编辑:
Here's the extended debug log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\node\\node.exe',
1 verbose cli 'C:\\Users\\Jonathan\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'es6-promise' ]
2 info using npm@6.5.0
3 info using …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行yarn --ignore-engines我的项目。我收到此错误消息:
error C:\Users\Jerome\mono\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: C:\Users\Jerome\mono\node_modules\node-sass
Output:
Building: C:\Program Files (x86)\nodejs\node.exe C:\Users\Jerome\mono\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\\Program Files (x86)\\nodejs\\node.exe',
gyp verb cli 'C:\\Users\\Jerome\\mono\\node_modules\\node-sass\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ] …Run Code Online (Sandbox Code Playgroud) 我有这个错误。请帮我。
Engines 字段是必需的,但在functions\package.json 中找不到。要解决此问题,请将以下行添加到 package.json 中: "engines": { "node": "8" }
我的包.json
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"dependencies": {
"firebase-admin": "^6.0.0",
"firebase-functions": "^2.0.4",
"lodash": "^4.17.10"
},
"private": true
}
Run Code Online (Sandbox Code Playgroud)