启动start.js时,我在控制台上收到一条错误消息。有什么问题?我使用cmder / bash和VS代码
一些简单的代码
const firstName = 'Name';
const lastName = 'Surname';
console.log(`${firstName} ${lastName}`);
显示的错误
λ node start.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'D:\Folder\nowy\start.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
package.json
{
"name": "nowy",
"version": "1.0.0",
"main": "start.js",
"scripts": {
"start": "node src/start.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"jest": "^24.8.0"
},
"description": ""
}
我的节点/ npm版本
λ node -v
v10.16.0
λ npm -v
6.9.0