Resolution NPM: unable to load file D:\code\Renren fast Vue\node_ modules.bin\npm.ps1
There are four steps
It is forbidden to run scripts on this system, that is, you do not have permission. First use the following command:
get-ExecutionPolicy
If output:
Restricted
The above indicates restricted and the status is prohibited. Then give a permission:
Set-ExecutionPolicy -Scope CurrentUser
Re enter:
RemoteSigned
The above is OK. If you want to verify it, enter get executionpolicy and output remotesigned
==================================================================
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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\2021-12-03T02_48_23_436Z-debug.log
PS D:\work\guigu\guli-vue\renren-fast-vue> get-ExecutionPolicy
Restricted
PS D:\work\guigu\guli-vue\renren-fast-vue> Set-ExecutionPolicy -Scope CurrentUser
cmdlet Set-ExecutionPolicy in command pipeline location 1
Please provide values for the following parameters:
ExecutionPolicy: RemoteSigned
PS D:\work\guigu\guli-vue\renren-fast-vue> get-ExecutionPolicy
RemoteSigned
PS D:\work\guigu\guli-vue\renren-fast-vue> npm install
Read More:
- [Weex]Error in creating project NPM: unable to load file D:\program files\nodejs\node_ global\ weex.ps1 Because scripts are not allowed to run on this system.
- [Solved] Webpack Error: SecurityError: (:) [], PSSecurityException
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- Cnpm install vuecli error [How to Solve]
- [Solved] NPM err! Cannot read property ‘parent’ of null npm ERR! A complete log of this run can be found in: npm ERR!
- [Solved] error: Unexpected console statement (no-console)
- [Solved] VUE3 Error: Error: ENOSPC: System limit for number of file watchers reached
- Ts-node Error: return new TSError(diagnosticText, diagnosticCodes);
- package.json Scripts configuration environment variable distinguishes development environment from production environment
- Node.js Error: Error: Cannot find module ‘express‘ [How to Solve]
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- Vue Package Image Error: Syntax Error: Error: ‘**\node_modules\pngquant-bin\vendor\pngquant.exe‘
- [Solved] Vite packing error: some chunks are larger than 500kb after minification
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- [Solved] Error: EPERM: operation not permitted (Permissions issue)
- [Solved] npm Install vuex Error: npm ERR! code ERESOLVE
- [Solved] Vue Compile Error: JavaScript heap out of memory
- Vue-cli2 sub environment packaging
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment