Prestashop classic theme _dev npm run watch say error - npm

i'm new to prestashop theme development.
i try to setup the classic theme from prestashop github repo.
i go into _dev and run "npm install"
after that i run "npm run watch" but i get the following error:
npm run watch
> prestashop-classic-dev-tools#1.0.0 watch C:\laragon\www\PrestaShopDev\themes\prodet\_dev
> webpack --progress --colors --debug --display-chunks --watch
10% building modules 1/1 modules 0 active
webpack is watching the files…
(node:9136) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(Use `node --trace-deprecation ...` to show where the warning was created)
77% module and chunk tree optimization bound C:\laragon\www\PrestaShopDev\themes\node_modules\webpack\lib\Chunk.js:824
throw new Error(
^
Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
at Chunk.get (C:\laragon\www\PrestaShopDev\themes\node_modules\webpack\lib\Chunk.js:824:9)
at C:\laragon\www\PrestaShopDev\themes\prodet\_dev\node_modules\extract-text-webpack-plugin\index.js:260:40
at Array.forEach (<anonymous>)
at ExtractTextPlugin.<anonymous> (C:\laragon\www\PrestaShopDev\themes\prodet\_dev\node_modules\extract-text-webpack-plugin\index.js:255:11)
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\laragon\www\PrestaShopDev\themes\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:12:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\laragon\www\PrestaShopDev\themes\node_modules\tapable\lib\Hook.js:35:21)
at Compilation.seal (C:\laragon\www\PrestaShopDev\themes\node_modules\webpack\lib\Compilation.js:1213:27)
at C:\laragon\www\PrestaShopDev\themes\node_modules\webpack\lib\Compiler.js:547:17
at eval (eval at create (C:\laragon\www\PrestaShopDev\themes\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:11:1)
at C:\laragon\www\PrestaShopDev\themes\node_modules\webpack\lib\Compilation.js:1064:12
at C:\laragon\www\PrestaShopDev\themes\node_modules\webpack\lib\Compilation.js:980:9
at processTicksAndRejections (internal/process/task_queues.js:75:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! prestashop-classic-dev-tools#1.0.0 watch: `webpack --progress --colors --debug --display-chunks --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the prestashop-classic-dev-tools#1.0.0 watch 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\ADMIN\AppData\Roaming\npm-cache\_logs\2020-12-09T10_24_12_727Z-debug.log
how can i fix this?

Related

adding "type":"module" or "type":"commonjs" breaks the build

When I deleted this "type", everything was building okey but my site got an error
Uncaught SyntaxError: Cannot use import statement outside a module (at index.js:1:1)
So I added "type":"module" to package.json but then I cannot build anymore, the error:
npm run build
> NewsJS#1.0.0 build C:\Users\ola12\Documents\git\news-JS\news-JS
> webpack --config ./webpack.config.js --env mode=prod
[webpack-cli] Failed to load 'C:\Users\ola12\Documents\git\news-JS\news-JS\webpack.config.js' config
[webpack-cli] ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and 'C:\Users\ola12\Documents\git\news-JS\news-JS\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///C:/Users/ola12/Documents/git/news-JS/news-JS/webpack.config.js:1:14
at ModuleJob.run (internal/modules/esm/module_job.js:169:25)
at async Loader.import (internal/modules/esm/loader.js:177:24)
at async WebpackCLI.tryRequireThenImport (C:\Users\ola12\Documents\git\news-JS\news-JS\node_modules\webpack-cli\lib\webpack-cli.js:254:18)
at async loadConfigByPath (C:\Users\ola12\Documents\git\news-JS\news-JS\node_modules\webpack-cli\lib\webpack-cli.js:1710:19)
at async Promise.all (index 0)
at async WebpackCLI.loadConfig (C:\Users\ola12\Documents\git\news-JS\news-JS\node_modules\webpack-cli\lib\webpack-cli.js:1763:29)
at async WebpackCLI.createCompiler (C:\Users\ola12\Documents\git\news-JS\news-JS\node_modules\webpack-cli\lib\webpack-cli.js:2185:18)
at async WebpackCLI.runWebpack (C:\Users\ola12\Documents\git\news-JS\news-JS\node_modules\webpack-cli\lib\webpack-cli.js:2321:16)
at async Command.<anonymous> (C:\Users\ola12\Documents\git\news-JS\news-JS\node_modules\webpack-cli\lib\webpack-cli.js:1058:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! NewsJS#1.0.0 build: `webpack --config ./webpack.config.js --env mode=prod`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the NewsJS#1.0.0 build 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\ola12\AppData\Roaming\npm-cache\_logs\2023-02-14T10_34_55_775Z-debug.log

Unable to "npm install"

Please could I ask for help with the following:
I have cloned the Electron starter app like so:
git clone https://github.com/electron/electron-quick-start
And have it running.
I am working from the terminal window is VSCode.
I am using node version 6.13.4
Can type "npm start" and all is good, app runs fine.
Now, I want to use a certain package for working with zip files, so I try the following:
npm install decompress-zip
The result is ultimately an error, here's the output:
PS C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip> npm install decompress-zip
> electron#16.0.5 postinstall C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip\node_modules\electron
> node install.js
RequestError: self signed certificate in certificate chain
at ClientRequest.<anonymous> (C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip\node_modules\got\source\request-as-event-emitter.js:178:14)
at Object.onceWrapper (events.js:428:26)
at ClientRequest.emit (events.js:333:22)
at ClientRequest.origin.emit (C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip\node_modules\#szmarczak\http-timer\source\index.js:37:11)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:321:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm WARN rollback Rolling back debug#2.6.9 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip\node_modules\extract-zip\node_modules'npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron#16.0.5 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#16.0.5 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\105043131\AppData\Roaming\npm-cache\_logs\2022-01-05T11_15_47_499Z-debug.log
Now the build is broken. If try again "npm start" then I get:
PS C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip> npm
start
electron-quick-start#1.0.0 start C:\Work\Electron Apps\electron-quick-start-added-fs-and-zip
electron .
internal/modules/cjs/loader.js:984 throw err; ^
Error: Cannot find module 'C:\Work\Electron
Apps\electron-quick-start-added-fs-and-zip\node_modules\electron\cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
at Function.Module._load (internal/modules/cjs/loader.js:863:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } npm ERR! code ELIFECYCLE npm
ERR! errno 1 npm ERR! electron-quick-start#1.0.0 start: electron .
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the
electron-quick-start#1.0.0 start 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\105043131\AppData\Roaming\npm-cache_logs\2022-01-05T11_18_31_473Z-debug.log
Makes no difference now if I run "npm uninstall decompress-zip", I still get the same error when I try "npm start".
This line from the above caught my eye:
npm ERR! Failed at the electron#16.0.5
If I start completely over an try installing another package instead like so:
npm install yauzl
I get similar errors including the line:
npm ERR! Failed at the electron#16.0.5 postinstall script.
I currently have electron 8.1.1 installed
Could it be that these packages require electron 16?
Or is it something else?
If it is the former, would anyone know of a solution for unzipping a disk file using an older version of electron?
Thanks for any help.
the best way is to update Node.js. Uninstall old version then go to https://nodejs.org/en/download/ and download LTC version

NPM Parallelshell not working, showing error

I was trying to run npm lite server and onchange for scss together as described in my course but instead got an error...
Tried Running npm start with package.json containing script as -
"scripts": {
"start": "npm run watch:all",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server",
"scss": "node-sass -o css/ css/",
"watch:scss": "onchange \"css/*.scss\" -- npm run scss",
"watch:all": "parallelshell \"npm run watch:scss\" \"npm run lite\""
}
Instead of working properly, I got the following error -
> confusion#1.0.0 start F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion
> npm run watch:all
> confusion#1.0.0 watch:all F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion
> parallelshell "npm run watch:scss" "npm run lite"
child_process.js:430
throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received function wrappedCwd
at normalizeSpawnArguments (child_process.js:430:11)
at spawn (child_process.js:546:13)
at F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion\node_modules\parallelshell\index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (F:\Courses\Full-Stack Web Development\Bootstrap4\conFusion\node_modules\parallelshell\index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion#1.0.0 watch:all: `parallelshell "npm run watch:scss" "npm run lite"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion#1.0.0 watch:all 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\Ankur\AppData\Roaming\npm-cache\_logs\2020-05-27T07_16_54_990Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! confusion#1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the confusion#1.0.0 start 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\Ankur\AppData\Roaming\npm-cache\_logs\2020-05-27T07_16_55_176Z-debug.log
How to remove this error..?
While searching for a solution I found the solution for this problem on another post -
Problem running parallelshell Nodejs script
go to the file:
node_modules/parallelshell/index.js:105
Then change this line:
cwd: process.versions.node < '8.0.0' ? process.cwd : process.cwd(),
To this:
cwd: parseInt(process.versions.node) < 8 ? process.cwd : process.cwd(),

Vue native: npm run watch:android

I have some problems with npm run watch:<platform>
I've already done:
$ npm install -g #vue/cli #vue/cli-init
$ vue init nativescript-vue/vue-cli-template
$ cd project-name
$ npm install
And for the next step I have this:
```λ npm run watch:android
test-vue-native#1.0.0 watch:android C:\git\test-vue-native
npm run watch -- --env.android
test-vue-native#1.0.0 watch C:\git\test-vue-native
webpack --watch --env.tnsAction run "--env.android"
info: Copying NativeScript plugins to template dependencies...
info: Preparing NativeScript application from template...
npm WARN test-vue-native# No repository field.
info: Bundling application for android...
Webpack is watching the files…
Executing post-build scripts
info: Running NativeScript application...
error: uncaughtException: Command failed: node launch.js run android
date=Mon Jul 09 2018 18:04:18 GMT+0300 (Moscow Standard Time), pid=22308, uid=null, gid=null, cwd=C:\git\test-vue-native, execPath=C:\Program Files\nodejs\node.exe, version=v10.6.0, argv=[C:\Program Files\nodejs\node.exe, C:\git\test-vue-native\node_modules\webpack\bin\webpack.js, --watch, --env.tnsAction, run, --env.android], rss=174575616, heapTotal=148561920, heapUsed=97997008, external=956561, loadavg=[0, 0, 0], uptime=3893667, trace=[column=12, file=child_process.js, function=ChildProcess.exithandler, line=291, method=exithandler, native=false, column=13, file=events.js, function=ChildProcess.emit, line=182, method=emit, native=false, column=16, file=internal/child_process.js, function=maybeClose, line=961, method=null, native=false, column=11, file=internal/child_process.js, function=Socket.stream.socket.on, line=380, method=on, native=false, column=13, file=events.js, function=Socket.emit, line=182, method=emit, native=false, column=12, file=net.js, function=Pipe._handle.close, line=598, method=close, native=false], stack=[Error: Command failed: node launch.js run android, , at ChildProcess.exithandler (child_process.js:291:12), at ChildProcess.emit (events.js:182:13), at maybeClose (internal/child_process.js:961:16), at Socket.stream.socket.on (internal/child_process.js:380:11), at Socket.emit (events.js:182:13), at Pipe._handle.close (net.js:598:12)]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-vue-native#1.0.0 watch: webpack --watch --env.tnsAction run "--env.android"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-vue-native#1.0.0 watch 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\gvolkov\AppData\Roaming\npm-cache_logs\2018-07-09T15_04_18_803Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-vue-native#1.0.0 watch:android: npm run watch -- --env.android
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-vue-native#1.0.0 watch:android 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\gvolkov\AppData\Roaming\npm-cache_logs\2018-07-09T15_04_18_856Z-debug.log```
What can helps me?
P.S.: I'm using windows x64
"NativeScript Advanced Setup: Windows" helps me
https://docs.nativescript.org/start/ns-setup-win

GIT Bash, npm start error

i am getting the following error on npm start command,
angular-quickstart#1.0.0 prestart C:\Project\myapp
npm run build
angular-quickstart#1.0.0 build C:\Project\myapp
tsc -p src/
angular-quickstart#1.0.0 start C:\Project\myapp
concurrently "npm run build:watch" "npm run serve"
Error occured when executing command: npm run build:watch
Error: Unable to detect platform shell type. Please set SHELL_EXECUTE_FLAG env variable.
at detectExecuteFlag (C:\Project\myapp\node_modules\spawn-default-shell\src\get-shell.js:29:9)
at getShell (C:\Project\myapp\node_modules\spawn-default-shell\src\get-shell.js:37:18)
at Object.spawn (C:\Project\myapp\node_modules\spawn-default-shell\src\index.js:5:24)
at C:\Project\myapp\node_modules\concurrently\src\main.js:192:34
at arrayMap (C:\Project\myapp\node_modules\lodash\lodash.js:660:23)
at Function.map (C:\Project\myapp\node_modules\lodash\lodash.js:9571:14)
at run (C:\Project\myapp\node_modules\concurrently\src\main.js:181:22)
at main (C:\Project\myapp\node_modules\concurrently\src\main.js:61:5)
at Object. (C:\Project\myapp\node_modules\concurrently\src\main.js:421:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:418:7)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v7.5.0
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart#1.0.0 start: concurrently "npm run build:watch" "npm run serve"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart#1.0.0 start script 'concurrently "npm run build:watch" "npm run serve"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently "npm run build:watch" "npm run serve"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Project\myapp\npm-debug.log
Try to update your nodejs refer to these answers:
How do I update node and npm on windows?
If the error still persist use this link:
'concurently' is not recognized as an internal or external command, operable program or batch file