aiexperiments-bird-sounds
aiexperiments-bird-sounds copied to clipboard
building
The index.html file - when opened in the browser - appears blank, which in my experience sometimes suggests there is a formatting error in it.
First, I installed node using its installer and webpack from the command line (npm install webpack -g
)
Then, seeing there is a webpack.config.js, I ran webpack
, but I got
ERROR in Entry module not found: Error: Cannot resolve module 'jshint-loader' in /Users/me/projects/aiexperiments-bird-sounds
I looked in webpack.config.js, and it has resolve: { root: __dirname, modulesDirectories : [ "node_modules", "third_party/", "app", "node_modules/tone/" ],
However, there is no node_modules directory in the repo.
Maybe I missed something simple on how to build the project?
Try running npm install
in the project root.
The index.html remains blank when opened in the browser. Here is the output.
$npm install
npm WARN deprecated [email protected]: Please use postcss-loader instead of autoprefixer-loader
npm WARN prefer global [email protected] should be installed with -g
> [email protected] install /Users/me/projects/aiexperiments-bird-sounds/node_modules/fsevents
> node-pre-gyp install --fallback-to-build
[fsevents] Success: "/Users/me/projects/aiexperiments-bird-sounds/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" is installed via remote
> [email protected] install /Users/me/projects/aiexperiments-bird-sounds/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.0/darwin-x64-48_binding.node
Download complete ⸩ ⠋ :
Binary saved to /Users/me/projects/aiexperiments-bird-sounds/node_modules/node-sass/vendor/darwin-x64-48/binding.node
Caching binary to /Users/me/.npm/node-sass/3.13.0/darwin-x64-48_binding.node
> [email protected] postinstall /Users/me/projects/aiexperiments-bird-sounds/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/me/projects/aiexperiments-bird-sounds/node_modules/node-sass/vendor/darwin-x64-48/binding.node
Testing binary
Binary is fine
[email protected] /Users/me/projects/aiexperiments-bird-sounds
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
# Lines skipped for brevity
└─┬ [email protected]
├── [email protected]
└── [email protected]
npm WARN [email protected] No license field.
Could you post any errors in the browser's console?
There was
GET file:///Users/me/projects/aiexperiments-bird-sounds/build/Main.js net::ERR_FILE_NOT_FOUND
at index.html:79, so I changed index.html:79 from
<script type="text/javascript" src="./build/Main.js"></script>
to
<script type="text/javascript" src="./app/Main.js"></script>
where Main.js is in the repo.
Saving and refreshing index.html, there is
Main.js:17 Uncaught ReferenceError: require is not defined(…)(anonymous function) @ Main.js:17
I see require() comes with node.js, so I may not have set up node.js correctly.
I ran $webpack
. This time
Hash: bf88b9e3e607d9867554
Version: webpack 1.13.3
Time: 2756ms
Asset Size Chunks Chunk Names
./build/Main.js 26.2 kB 0 [emitted] Main
./build/1.js 902 bytes 1 [emitted]
./build/2.js 2.57 MB 2 [emitted]
+ 196 hidden modules
opening index.html resulted in
Uncaught ReferenceError: require is not defined(…)
(at Main.js:17)