I am trying to upgrade to Polymer 3 from Polymer 2. My environment follows:
Debian Stretch
npm version 6.1.0
command run with root account: npm install -g polymer-cli
Any idea? Thank you in advance!
/usr/bin/polymer -> /usr/lib/node_modules/polymer-cli/bin/polymer.js
> wd#1.6.2 install /usr/lib/node_modules/polymer-cli/node_modules/wd
> node scripts/build-browser-scripts
/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:90
throw err0;
^
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/polymer-cli/node_modules/wd/build'
at Object.fs.mkdirSync (fs.js:902:18)
at sync (/usr/lib/node_modules/polymer-cli/node_modules/mkdirp/index.js:71:13)
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/wd/scripts/build-browser-scripts.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules/polymer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
This seems to be caused by npm issue #17346.
The current workaround is to call npm install -g polymer-cli with the --unsafe-perm flag until a new fix is released.
Related
I am getting the below mentioned error and I am not able to figure out how to handle it. Versions of gulp, node and npm are mentioned below. I don't know if it is node's version mismatch with that of gulp or something else but so far any help would be much appreciated.
gulp -v
CLI Version: 2.3.0
Local Version: 3.9.1
node -v
v6.10.3
npm -v
3.10.10
ERROR
C:\xampp\htdocs\ecommerce\node_modules\engine.io\build\server.js:173
async handshake(transportName, req, closeConnection) {
^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\xampp\htdocs\ecommerce\node_modules\engine.io\build\engine.io.js:5:18)
Support for async functions was added in Node 7.6.0.
You are using Node 6.10.3.
You need to upgrade.
The oldest version of Node which is still supported (although only for a matter of weeks!) is version 12.
Upgrade to at least version 16.14.2 (the current long term support release).
install version 8.11.1 and run :
npm install
npm install gulp bower --global
npm install node-sass#latest
npm uninstall laravel-elixir
npm uninstall session
npm install --save laravel-elixir
npm install --save session
gulp
after that it will work
So I am following an online course and I am stuck. I am running the command npm run start in cmd and it seems not to be working.
Here is the webpack.config.js file:
enter image description here
Here is the package.json file:
enter image description here
Here is the error code I get from cmd:
C:\Users\user\Desktop\complete-javascript-course-master\9-forkify\starter>npm run start
> forkify#1.0.0 start C:\Users\user\Desktop\complete-javascript-course-master\9-forkify\starter
> webpack-dev-server --mode development --open
internal/modules/cjs/loader.js:985
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
Require stack:
- C:\Users\user\Desktop\complete-javascript-course-master\9-forkify\starter\node_modules\webpack-dev-server\bin\webpack-dev-server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
at Function.Module._load (internal/modules/cjs/loader.js:864:27)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\user\Desktop\complete-javascript-course-master\9-forkify\starter\node_modules\webpack-dev-server\bin\webpack-dev-server.js:65:1)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\user\\Desktop\\complete-javascript-course-master\\9-forkify\\starter\\node_modules\\webpack-dev-server\\bin\\webpack-dev-server.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! forkify#1.0.0 start: `webpack-dev-server --mode development --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the forkify#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\user\AppData\Roaming\npm-cache\_logs\2020-05-04T10_43_57_046Z-debug.log
C:\Users\user\Desktop\complete-javascript-course-master\9-forkify\starter>
What could be possibly wrong please?
when i enter npm start in the cmd i got that error:
Error: Cannot find module 'mysql'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\fmanagement\db_mysql\dbconnection.js:1:75)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fmanagement#1.0.0 start: node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fmanagement#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\Flavio Luiz\AppData\Roaming\npm-cache_logs\2018-08-16T23_51_52_867Z-debug.log
after that im install mysql with
npm install -g mysql
and that is my dbconnection.js:
var mysql = require('mysql');
var connection=mysql.createPool({
host:'jdbc:mysql://localhost:3306/',
user:'root',
password:'',
database:'fmanagement'
});
module.exports=connection;
im newbie with node js. im doing something wrong?
I am following this laracasts video. Here is my
package.json:
{
"private": true,
"devDependencies": {
"gulp": "^3.8.8"
},
"dependencies": {
"laravel-elixir": "^2.0.0",
"bootstrap-sass": "^3.0.0"
}
}
I installed gulp using
npm install gulp
Then I executed:
npm install in the project root directory for installing the dependencies in package.json
Now when I execute gulp, I get this error:
module.js:339
throw err;
^
Error: Cannot find module 'lodash/lang/isFunction'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (D:\PhpIdeaProjects\LaravelLearning\myproject-flyer\no
de_modules\laravel-elixir\node_modules\babelify\node_modules\babel-core\lib\api\
node.js:21:29)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
Then after some research, I execute npm install theMissingModuleName (Here theMissingModuleName is lodash/lang/isFunction) which runs successfully. But again when I run gulp, I get another missind module error(For different module). I install that then it gives another.....
This cycle continues.
I have already installed gulp locally using npm install gulp -g and placed C:\Users\rahul\AppData\Roaming\npm directory in path.
So now what should I do to avoid these recursive errors?
Make sure you have updated npm to the latest version:
npm install npm#latest -g
Then check you have version 3.x.x installed:
npm -v
As of 3.0.0 npm has a flat directory structure so you shouldn't run in to max character limit issue.
After you have updated, just delete your node_modules and do:
npm install
in the root of your project.
I installed gulp on my machine, but when i try to compile my project i have this error:
Error: Cannot find module 'del'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Applications/MAMP/htdocs/project/gulpfile.js:6:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
I dont understand the error and i dont know how solve.
Someone can help me?
Thanks
This error message indicates that the module 'del' cannot be found. It seems that the 'del' package is not installed or not properly configured in your project.
Try installing the 'del' package by running the following command in your terminal:
npm install del --save-dev
If you have already installed 'del' package and still getting this error, try uninstalling and then reinstalling it.
npm uninstall del
npm install del --save-dev
Also make sure that you have the latest version of npm and node installed on your machine.
npm install -g npm
After installing or reinstalling 'del' package, you can try running the gulp command again and see if the error persists.