我试过 更新'和' ncu'我得到了以下警告和错误:
npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'
npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'
npm ERR! enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! Proj_Dir/npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'
npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'
npm ERR! enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'
npm ERR! Please include the following file with any support request:
npm ERR! Proj_Dir/npm-debug.log
npm-debug.log
-------------
37224 warn ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'
37225 warn ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'
37226 verbose stack Error: ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'
37232 error path Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash
37236 error enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modules/sails-generate-frontend/node_modules/lodash' -> 'Proj_Dir/node_modules/grunt-contrib-less/node_modules/lodash'
答案 0 :(得分:1)
假设您的风帆版本为0.11.0,请运行此命令。
npm install sails@~0.12.0 --force --save
有关详细信息,请访问官方site
与大多数Node包一样,Sails尊重语义版本。例如,如果您使用的是Sails v0.11.3,然后升级到Sails v0.11.4,则无需更改应用程序代码。这称为补丁版本。另一方面,如果从Sails v0.11.3升级到v0.12.0,您可能会遇到一些重大更改 - 这意味着您需要更改Sails应用程序的代码才能使用新版本。
备注强>
一旦Sails v1.0发布,轻微版本颠簸的目的不会导致 打破变化 - 例如应该从v1.1.0升级到v1.2.0 不要强迫您更改代码;而升级到 v2.0.0可能。
如果您是最新版本之后的多个次要版本而遇到的问题 困难,请考虑一次更新您的应用程序。该 迁移指南是在考虑特定版本差异的情况下编写的 而你可能已经清楚地意识到,如果有疑问,那就最好了 尽可能多地隔离变量。例如,如果你是 运行Sails v0.9并尝试升级到Sails v0.12但有 麻烦,首先升级到Sails v0.10,然后升级到v0.11,然后升级到v0.12。