【发布时间】:2018-09-02 22:35:23
【问题描述】:
在 Visual Studio Code 中,我希望我的 javascript 程序能够通过服务器自动运行,因为我正在通过在线学习 javascript。
我尝试执行与我在 Setup IDE 上观看教程相同的步骤。
所以我安装了 Git 和 Node,现在当我打开 Visual Studio 时,保存一个 Hello World 程序后,它应该会自动运行。
所以我输入终端:npm install 然后出现错误,然后我再次输入 npm run dev 在浏览器中启动我的服务器。
i [the error in the pic is :
C:\Users\Addie\Desktop\JS\webpack-starter-master>npm install
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\Addie\Desktop\JS\webpack-starter-master\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Addie\Desktop\JS\webpack-starter-master\package.json'
npm WARN webpack-starter-master No description
npm WARN webpack-starter-master No repository field.
npm WARN webpack-starter-master No README data
npm WARN webpack-starter-master No license field.
up to date in 10.317s
found 0 vulnerabilities
C:\Users\Addie\Desktop\JS\webpack-starter-master>npm run dev
npm ERR! path C:\Users\Addie\Desktop\JS\webpack-starter-master\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Addie\Desktop\JS\webpack-starter-master\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Addie\AppData\Roaming\npm-cache\_logs\2018-09-02T22_21_22_028Z-debug.log
]1
请帮帮我,我应该怎么做,我做错了什么?
【问题讨论】:
标签: javascript node.js npm webpack