Skip to content

npm install The keyword 'package' is reserved (3:6) You may need an appropriate loader to handle this file type. #684

@alvarolips

Description

@alvarolips

getting this when following the getting started instructions for js at the step #1 running npm install

[ec2-user@ip-172-31-10-94 src]$ sudo npm start

amplify-js-app@1.0.0 start /home/ec2-user/amplify-js-app
webpack && webpack-dev-server --mode development

Hash: 95d791161198aaabcc0b
Version: webpack 4.32.0
Time: 103ms
Built at: 05/20/2019 6:39:53 PM
Asset Size Chunks Chunk Names
index.html 1.54 KiB [emitted]
main.bundle.js 28.9 KiB main [emitted] main
Entrypoint main = main.bundle.js
[./src/app.js] 245 bytes {main} [built] [failed] [1 error]

ERROR in ./src/app.js 3:6
Module parse failed: The keyword 'package' is reserved (3:6)
You may need an appropriate loader to handle this file type.
| - amplify-js-app
| - index.html

- package.json

| - webpack.config.js
| - /src
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! amplify-js-app@1.0.0 start: webpack && webpack-dev-server --mode development
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the amplify-js-app@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! /root/.npm/_logs/2019-05-20T18_39_53_938Z-debug.log

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions