我正在尝试通过命令提示符创建一个余烬应用程序
我安装了Nodejs版本v10.16.0,然后使用命令npm install -g ember -cli
安装了ember。 ember已成功安装版本ember-cli 3.10.1。
然后,我使用命令ember new ember-quickstart
创建了一个新应用程序。然后出现以下错误:
Error creating new application. Removing generated directory `./kushi`
Command failed: npm install --loglevel error
npm WARN deprecated @babel/polyfill@7.4.4: ? As of Babel 7.4.0, this
npm WARN deprecated package has been deprecated in favor of directly
npm WARN deprecated including core-js/stable (to polyfill ECMAScript
npm WARN deprecated features) and regenerator-runtime/runtime
npm WARN deprecated (needed to use transpiled generator functions):
npm WARN deprecated
npm WARN deprecated import "core-js/stable";
npm WARN deprecated import "regenerator-runtime/runtime";
npm WARN deprecated exists-sync@0.0.4: Please replace with usage of fs.existsSync
npm WARN tar ENOENT: no such file or directory, open
'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\broccoli-rollup-93db1951\dist\index.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\broccoli-rollup-93db1951\dist\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\js\blueprints\ember-cli-typescript\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\js\lib\commands\clean.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\js\lib\commands\precompile.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\js\lib\utilities\copy-declarations.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\js\lib\utilities\ember-cli-entities.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\js\lib\utilities\fork.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\blueprint-files\ember-cli-typescript\__config_root__\config\environment.d.ts'
npm WARN tar ENOENT: no
such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-typescript-b54d1b7c\blueprint-files\ember-cli-typescript\types\__app_name__\index.d.ts'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-5cfc18ea\blueprints\module-unification-app\files\src\ui\routes\application\template.hbs'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-5cfc18ea\lib\tasks\server\middleware\broccoli-watcher\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-5cfc18ea\lib\tasks\server\middleware\broccoli-watcher\package.json'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-5cfc18ea\lib\tasks\server\middleware'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\kagrawal.EMEAAD\Desktop\kushi\node_modules\.staging\ember-cli-5cfc18ea\lib'
npm ERR! code ERR_INVALID_OPT_VALUE
npm ERR! The value "false" is invalid for option "readableHighWaterMark"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\kagrawal.EMEAAD\AppData\Roaming\npm-cache\_logs\2019-07-02T09_36_58_880Z-debug.log
Stack Trace and Error Report: C:\Users\KAGRAW~1.EME\AppData\Local\Temp/error.dump.4edeef2bba53a9733909115d695aa4ba.log
有人可以帮助我解决错误吗?
答案 0 :(得分:3)
Ola @dhS,
我在您的回答中注意到您说Ember不支持Node 10,那是不对的。节点对Ember的支持通常取决于对其进行测试的方式以及当前在节点8、10、11和12上运行持续集成(CI)的能力。
您的npm安装可能存在权限问题或潜在问题,如果没有错误末尾列出的文件内容,则很难诊断出来:
Stack Trace and Error Report: C:\Users\KAGRAW~1.EME\AppData\Local\Temp/error.dump.4edeef2bba53a9733909115d695aa4ba.log
下次遇到这样的错误时,拥有此文件的内容将非常有帮助?
此外,您发布的大多数错误都是警告,可能与计算机上的权限问题有关。?如果再次遇到此问题,可能值得升级或重新安装它,并通过运行以下命令确保您使用的是最新的npm版本:
npm i -g npm@latest
答案 1 :(得分:0)
此问题的专业解决方案
运行以下命令检查您的npm版本:npm -v
找到运行的版本后,通过检查package.json确认该版本,然后检查引擎...您将看到项目所需的npm和节点版本。
将您的npm版本升级到package.json上反映的版本