老师,我已经安装了parcel。但是执行命令的时候显示报错了。报错信息如下
来源:4-11 使用 Parcel 打包 TS 代码

哈士奇附体
2020-03-23
Error: Could not locate the bindings file. Tried:
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\build\watch
er.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\build\Debug
\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\build\Relea
se\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\out\Debug\w
atcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\Debug\watch
er.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\out\Release
\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\Release\wat
cher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\build\defau
lt\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\compiled\10
.13.0\win32\x64\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\addon-build
\release\install-root\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\addon-build
\debug\install-root\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\addon-build
\default\install-root\watcher.node
→ G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\lib\binding
\node-v64-win32-x64\watcher.node
at bindings (G:\download document\typescript2\node_modules\_bindings@1.5.0@bindings\bindings.js:126:9)
at Object.<anonymous> (G:\download document\typescript2\node_modules\_@parcel_watcher@2.0.0-alpha.5@@parcel\watcher\index.js:1:98)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (G:\download document\typescript2\node_modules\_@parcel_fs@2.0.0-nightly.166@@parcel\fs\lib\NodeFS.js:20:39)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! typescript2@1.0.0 test: `parcel ./src/index.html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the typescript2@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-03-23T15_32_06_801Z-debug.log
这个是我package.json文件的命令
"scripts": {
"test": "parcel ./src/index.html"
},
也按照网上的一些说法使用npm rebuild 还是不行
写回答
1回答
-
删除node_modules, 重新安装后重试呢
112020-03-25
相似问题