作者:叨B叨B叨叨叨 | 来源:互联网 | 2023-08-31 19:21
配置es6环境中在gitbash中执行npm start出现报错,步骤如下
RoseMe@DESKTOP-TGRAMD5 MINGW64 ~
$ cd /E
RoseMe@DESKTOP-TGRAMD5 MINGW64 /E
$ touch index
RoseMe@DESKTOP-TGRAMD5 MINGW64 /E
$ git clone https://github.com/cucygh/es6...
Cloning into 'es6-webpack'...
remote: Enumerating objects: 31, done.
remote: Total 31 (delta 0), reused 0 (delta 0), pack-reused 31
Unpacking objects: 100% (31/31), done.
RoseMe@DESKTOP-TGRAMD5 MINGW64 /E
$ npm i
npm WARN saveError ENOENT: no such file or directory, open 'E:package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'E:package.json'
npm WARN !invalid#2 No description
npm WARN !invalid#2 No repository field.
npm WARN !invalid#2 No README data
npm WARN !invalid#2 No license field.
up to date in 2.974s
found 0 vulnerabilities
RoseMe@DESKTOP-TGRAMD5 MINGW64 /E
$ npm i webpack -g
C:UsersRoseMeAppDataRoamingnpmwebpack -> C:UsersRoseMeAppDataRoamingnpmnode_moduleswebpackbinwebpack.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_moduleswebpacknode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
updated 1 package in 14.487s
RoseMe@DESKTOP-TGRAMD5 MINGW64 /E
$ npm i webpack-dev-server -g
C:UsersRoseMeAppDataRoamingnpmwebpack-dev-server -> C:UsersRoseMeAppDataRoamingnpmnode_moduleswebpack-dev-serverbinwebpack-dev-server.js
npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:UsersRoseMeAppDataRoamingnpmnode_moduleswebpack-dev-servernode_modulesfseventsnode_modules'
npm WARN webpack-dev-server@3.2.1 requires a peer of webpack@^4.0.0 but none is installed. You mustinstall peer dependencies yourself.
npm WARN webpack-dev-middleware@3.6.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_moduleswebpack-dev-servernode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 10 packages from 9 contributors, removed 3 packages and updated 167 packages in 22.88s
RoseMe@DESKTOP-TGRAMD5 MINGW64 /E
$ npm start
npm ERR! path E:package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'E: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:UsersRoseMeAppDataRoamingnpm-cache_logs2019-03-07T14_25_03_082Z-debug.log